package com.kuqi;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class InterceptorConfig extends WebMvcConfigurationSupport {

    @Override
    protected void addResourceHandlers(ResourceHandlerRegistry registry) {
        // 静态资源映射
        registry.addResourceHandler("/app/audio/**").addResourceLocations("classpath:/static/audio/");
        registry.addResourceHandler("/app/css/**").addResourceLocations("classpath:/static/css/");
        registry.addResourceHandler("/app/data/**").addResourceLocations("classpath:/static/data/");
        registry.addResourceHandler("/app/effects/**").addResourceLocations("classpath:/static/effects/");
        registry.addResourceHandler("/app/flash/**").addResourceLocations("classpath:/static/flash/");
        registry.addResourceHandler("/app/fonts/**").addResourceLocations("classpath:/static/fonts/");
        registry.addResourceHandler("/app/icon/**").addResourceLocations("classpath:/static/icon/");
        registry.addResourceHandler("/app/images/**").addResourceLocations("classpath:/static/images/");
        registry.addResourceHandler("/app/img/**").addResourceLocations("classpath:/static/img/");
        registry.addResourceHandler("/app/js/**").addResourceLocations("classpath:/static/js/");
//        registry.addResourceHandler("/app/**").addResourceLocations("classpath:/static/");
//        registry.addResourceHandler("/app/js/**").addResourceLocations("classpath:/static/js/");
//        System.out.println("已经注册了handle");
    }
}

